package com.atguigu.gmall.activity.client;

import com.atguigu.gmall.activity.client.impl.ActivityDegradeFeignClient;
import com.atguigu.gmall.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * title:
 * author: Gyh
 * date:2023-05-13 10:14
 * Description:
 */
@FeignClient(value = "service-activity",fallback = ActivityDegradeFeignClient.class,path = "/api/activity")
public interface ActivityFeignClient {

    /**
     * 查询Redis中当日秒杀商品列表
     * @return
     */
    @GetMapping("/inner/seckill/findAll")
    public Result getSeckillGoodsList();

    /**
     * 查询指定秒杀商品信息
     * @param skuId
     * @return
     */
    @GetMapping("/inner/seckill/getSeckillGoods/{skuId}")
    public Result getSeckillGoods(@PathVariable("skuId") Long skuId);
}
